import "babel-polyfill";
import Vue from "vue";
import App from "./App";
import store from "./store/";

import routerMap from "./router";
import VueRouter from "vue-router";
Vue.use(VueRouter);

import ElementUI from "element-ui";
import "element-ui/lib/theme-chalk/index.css";
Vue.use(ElementUI, {
  // size: "small"
});

import "./styles/base.css";
import "./styles/commonly.css";
import "./styles/elementBase.css";
import "./styles/util.css";

import base from "./utils/base";
Vue.use(base);

// 全局过滤
import filter from "./utils/filter";
for (let key in filter) {
  Vue.filter(key, filter[key]);
}

const router = new VueRouter({
  // hash history
  mode: "hash",
  base: __dirname,
  routes: routerMap
});


new Vue({
  store,
  router,
  render: h => h(App)
}).$mount("#app");
